package org.mytang.fairydust.core;

import com.alibaba.fastjson.JSON;
import org.mytang.bridge.Bridge;
import org.mytang.fairydust.core.service.dubbo.GrayRule;
import sun.instrument.InstrumentationImpl;

import java.io.File;
import java.lang.instrument.Instrumentation;
import java.security.CodeSource;
import java.security.ProtectionDomain;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.jar.JarFile;
import java.util.stream.Collectors;

public class Main {



    //java -jar -Dspring.profiles.active=test
    // -javaagent:/Users/tangmengyang/Git/zcy-service-proxy/lib/proxy-agent.jar=gray.rule.global%3D%7B%22condition%22%3A%22true%22%7D -Denv=FAT -Dapollo.cluster=test -Dapollo.meta=http://172.16.101.16:8080 zcy-workflow-center-1.14.0-RELEASE.jar
    public static void main(String[] args) throws Exception {

        ProtectionDomain protectionDomain = Main.class.getProtectionDomain();
        System.out.println(protectionDomain);
        System.out.println(protectionDomain.getCodeSource());
        System.out.println(protectionDomain.getCodeSource().getLocation());
        System.out.println(protectionDomain.getCodeSource().getLocation().toURI().toURL());
        System.out.println(protectionDomain.getCodeSource().getLocation().toURI().getSchemeSpecificPart());

        System.out.println(ClassLoader.getSystemClassLoader().getParent());
        System.out.println(ClassLoader.getSystemClassLoader());


        String format = String.format("【%s】流程的节点编码已经存在其他流程中:【%s】", "k1", "k2");
        System.out.println(format);

    }

}
